﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Orid.Data.SqlServer;


namespace Orid.Management.Statistics.Tools.Decomposition.Data
{
    class DistributeOnline:Distribute
    {
        string connectString, distributesTableName, UploadJobStoreAddress;

        public DistributeOnline(string UploadJobStoreAddress)
        {
            this.UploadJobStoreAddress = UploadJobStoreAddress;

            connectString =  Config.Setting.SettingInstance.DBAddress_Online;

            //[Distributes]
            distributesTableName = "  [FutureManagement_Manage].[FutureMa].[Distributes]";
        }

        public override List<Orid.Management.Statistics.Tools.Decomposition.Model.ModelJob> GetJobsFromDistributes(Guid OrderId)
        {
            if (OrderId == null)
            {
                return null;
            }
            try
            {
                return GetJobsFromDistributes(OrderId, connectString, distributesTableName
                    , new AccountOnline(), new UploadJobStoreOnline(UploadJobStoreAddress));
            }
            catch (Exception ex)
            {
                throw ex;
            }
           

             
        }
 
    }
}
